import matplotlib
import random

def resultGen(baseline, m1percent, m2percent, offset=0.05,iter=1):
    m1result = []
    m2result = []
    i = 0
    if offset < 0.05:
        offset = 0.05
    
    for i in range(1, iter+1):
        j = 0
        for point in baseline:
            if i == 1:
                m1result.append(point*(m1percent[i]+random.uniform(offset-0.05, offset+0.05)))
                m1result.append(point*(m2percent[i]+random.uniform(offset-0.05, offset+0.05)))
            else:
                m1result[j] += point*(m1percent[i]+random.uniform(offset-0.05, offset+0.05))
                m2result[j] += point*(m2percent[i]+random.uniform(offset-0.05, offset+0.05))
            j+=1

        